#pragma once
#include <string>
#include <vector>
#include "..\tinxml\tinyxml.h"
#include "Typedef.h"
#include "string.h"
#include <map>
class CConfigFileManager
{
public:
	CConfigFileManager();
	~CConfigFileManager();
	bool ParseConfigFile();
	static std::wstring GetFileConfigPath();
	void ParseIOSetting(TiXmlNode* node);
	void ParseAxisSetting(TiXmlNode* node);
	void ResetData();
	void ReloadConfigFile();
	bool UpdateAxisSetting(std::wstring id,AXIS_SETTING axissetting);
public:
	std::vector<IO_MODULE>* GetIOInputSetting();
	std::vector<IO_MODULE>* GetIOOutputSetting();
	std::map<int, AXIS_SETTING>* GetAxisSettingDict();
private:
	bool m_bLoad;
	std::wstring m_ConfigFilePath;
	std::vector<IO_MODULE>m_vIOInputSetting;
	std::vector<IO_MODULE>m_vIOOutputSetting;
	std::map<int, AXIS_SETTING>                m_dictAxisSetting;
};

